]> dgit.raspbian.org Git - gnome-shell.git/commit
messageTray: Fix race condition causing stuck notification banners
authoreveryx <lunt.luo@gmail.com>
Sat, 13 Sep 2025 04:01:17 +0000 (12:01 +0800)
committereveryx <lunt.luo@gmail.com>
Sat, 13 Sep 2025 04:02:50 +0000 (12:02 +0800)
commit93a79cf61b2b404357e6f637cc9e7f324fb27a69
tree3e29f8349abf6afd72160c54f360ad38a32c2fa6
parentd06f1895187e67ee96d36d787c45e0d93a3aa050
messageTray: Fix race condition causing stuck notification banners

A race condition can occur where a notification banner gets stuck on screen
and never disappears.

This happens when a new notification needs to be shown while an old one
is in the middle of its hiding animation. The process to show the new
notification calls `remove_all_transitions()`, which forcefully stops
the hiding animation of the old one.

The cleanup logic, which destroys the old banner actor, was located in
the `onComplete` handler of the animation. Since the animation was
interrupted and not completed, this handler was never called, leaving a
"zombie" banner on screen.

To fix this, the call to the cleanup function is moved from the
`onComplete` handler to an `onStopped` handler. This handler is
guaranteed to be called whenever an animation stops, regardless of
whether it finished successfully or was interrupted. This ensures the
banner is always cleaned up correctly.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6006
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3861>
js/ui/messageTray.js